package com.testdocs.client.project.event;

import com.google.gwt.event.shared.GwtEvent;
import com.testdocs.client.project.ProjectInfo;

public class ProjectsListLoadedEvent extends GwtEvent<ProjectsListLoadedEventHandler>{
	public static Type<ProjectsListLoadedEventHandler> TYPE = new Type<ProjectsListLoadedEventHandler>();

	private ProjectInfo projects[];

	public ProjectsListLoadedEvent(ProjectInfo projects[]) {
		this.projects = projects;
	}

	@Override
	protected void dispatch(ProjectsListLoadedEventHandler handler) {
		handler.projectsListLoaded(this);
	}

	@Override
	public Type<ProjectsListLoadedEventHandler> getAssociatedType() {
		return TYPE;
	}
	
	public ProjectInfo[] getProjects() {
		return projects;
	}

}
